package it.unibz.ti2.internetPizzeria.entities;


import java.util.List;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Storing information about customer
 *
 */

@Entity
@Table(name = "USERS")
@DiscriminatorValue("Customer")
public class Customer extends User {

	@Column(name = "CUSTOMER_STREETANDNUMBER")
	private String streetAndNumber;
	
	@Column(name = "CUSTOMER_ZIPCODE")
	private String zipCode;
	
	@Column(name = "CUSTOMER_CITY")
	private String city;
	
	@Column(name = "CUSTOMER_COUNTRY")
	private String country;
	
	@Column(name = "CUSTOMER_TELEPHONE")
	private String telephone;

	public String getCity() {
		return city;
	}

	@OneToMany(mappedBy="customer")
	private List<Order> orders;
	
	
	public List<Order> getOrders() {
		return orders;
	}

	public void setOrders(List<Order> orders) {
		this.orders = orders;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getStreetAndNumber() {
		return streetAndNumber;
	}

	public void setStreetAndNumber(String streetAndNumber) {
		this.streetAndNumber = streetAndNumber;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	
}
